<script>
import Login from "@/views/Login.vue";
import mySwiper from "@/views/my-swiper.vue";
import myElement from "./components/my-element.vue";
import userInfo from "@/views/user-info.vue";

export default {
  name: "app",
  components: { Login, mySwiper, myElement, userInfo },
  data() {
    return {
      username: "admin",
    };
  },
  methods: {
    changeHandle(u) {
      this.$axios
        .get("/test/room/list")
        .then((result) => {
          console.log(result.data);
        })
        .catch((err) => {});
      this.username = u;
    },
  },
};
</script>

<template>
  <myElement />
  <h2>{{ username }}</h2>
  <Login title="学生管理系统" @changeUsername="changeHandle" />
  <mySwiper />
  <!-- <Login title="酒店管理系统" /> -->

  <userInfo></userInfo>
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}

h2 {
  color: blueviolet;
}
</style>
